package com.huangd.platform.modules.sys.entity.to;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.util.ArrayList;
import java.util.List;


@Configuration
@ConfigurationProperties(prefix = "game")
@Data
public class GamesTo {
    // 这里的名字要和yml中的对应字段名称一致
    private static List<GameTo> games = new ArrayList();

    // 注意此处的static关键字
    public static List<GameTo> getGames() {
        return games;
    }

    public void setGames(List<GameTo> games) {
        this.games = games;
    }

    // 这里的名字要和yml中的对应字段名称一致
    private static List<ChannelTo> channels = new ArrayList();

    // 注意此处的static关键字
    public static List<ChannelTo> getChannels() {
        return channels;
    }

    public void setChannels(List<ChannelTo> channels) {
        this.channels = channels;
    }

    @Data
    public static class GameTo {
        Integer id;
        String name;
        String channels;
    }

    @Data
    public static class ChannelTo {
        String name;
        String code;
        String channels;
    }

}
